// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_FA_SALE_ASSETS
// * CreateDate    : 2014-06-05 18:29:43
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:43
// * LastChanger   : 2014-06-05 18:29:43
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class FaSaleAssetsEntity : EntityBase
    {
        public FaSaleAssetsTable TableSchema
        {
            get
            {
                return FaSaleAssetsTable.Current;
            }
		}
		
		public FaSaleAssetsEntity()
        {

        }
		
		public FaSaleAssetsEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.SalePerson = Convert.ToString(CommonFunctions.ToObject(dr["SALE_PERSON"]));
			this.SaleDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["SALE_DATE"]));
			this.Buyer = Convert.ToString(CommonFunctions.ToObject(dr["BUYER"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }
		
		public FaSaleAssetsEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.SalePerson = Convert.ToString(CommonFunctions.ToObject(dr["SALE_PERSON"]));
			this.SaleDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["SALE_DATE"]));
			this.Buyer = Convert.ToString(CommonFunctions.ToObject(dr["BUYER"]));
			this.Price = Convert.ToDecimal(CommonFunctions.ToObject(dr["PRICE"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return FaSaleAssetsTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(FaSaleAssetsTable.C_ID)); }
            set { SetData(FaSaleAssetsTable.C_ID, value); }
        }
		
        [DataMember]
        public string SalePerson
        {
            get { return Convert.ToString(GetData(FaSaleAssetsTable.C_SALE_PERSON)); }
            set { SetData(FaSaleAssetsTable.C_SALE_PERSON, value); }
        }
		
        [DataMember]
        public DateTime SaleDate
        {
            get { return Convert.ToDateTime(GetData(FaSaleAssetsTable.C_SALE_DATE)); }
            set { SetData(FaSaleAssetsTable.C_SALE_DATE, value); }
        }
		
        [DataMember]
        public string Buyer
        {
            get { return Convert.ToString(GetData(FaSaleAssetsTable.C_BUYER)); }
            set { SetData(FaSaleAssetsTable.C_BUYER, value); }
        }
		
        [DataMember]
        public decimal Price
        {
            get { return Convert.ToDecimal(GetData(FaSaleAssetsTable.C_PRICE)); }
            set { SetData(FaSaleAssetsTable.C_PRICE, value); }
        }
		
        [DataMember]
        public string Remark
        {
            get { return Convert.ToString(GetData(FaSaleAssetsTable.C_REMARK)); }
            set { SetData(FaSaleAssetsTable.C_REMARK, value); }
        }
		
		#endregion
	}
	
	
}	

